

<%@ page import="buscar.Veiculo" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'veiculo.label', default: 'Veiculo')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${veiculoInstance}">
            <div class="errors">
                <g:renderErrors bean="${veiculoInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="modelo"><g:message code="veiculo.modelo.label" default="Modelo" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'modelo', 'errors')}">
                                    <g:textField name="modelo" value="${veiculoInstance?.modelo}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="marca"><g:message code="veiculo.marca.label" default="Marca" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'marca', 'errors')}">
                                    <g:textField name="marca" value="${veiculoInstance?.marca}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="ano"><g:message code="veiculo.ano.label" default="Ano" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'ano', 'errors')}">
                                    <g:textField name="ano" value="${fieldValue(bean: veiculoInstance, field: 'ano')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="valor"><g:message code="veiculo.valor.label" default="Valor" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'valor', 'errors')}">
                                    <g:textField name="valor" value="${fieldValue(bean: veiculoInstance, field: 'valor')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cor"><g:message code="veiculo.cor.label" default="Cor" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'cor', 'errors')}">
                                    <g:textField name="cor" maxlength="10" value="${veiculoInstance?.cor}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="alarme"><g:message code="veiculo.alarme.label" default="Alarme" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'alarme', 'errors')}">
                                    <g:checkBox name="alarme" value="${veiculoInstance?.alarme}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="arCondicionado"><g:message code="veiculo.arCondicionado.label" default="Ar Condicionado" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'arCondicionado', 'errors')}">
                                    <g:checkBox name="arCondicionado" value="${veiculoInstance?.arCondicionado}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cambioAutomatico"><g:message code="veiculo.cambioAutomatico.label" default="Cambio Automatico" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'cambioAutomatico', 'errors')}">
                                    <g:checkBox name="cambioAutomatico" value="${veiculoInstance?.cambioAutomatico}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cliente"><g:message code="veiculo.cliente.label" default="Cliente" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'cliente', 'errors')}">
                                    <g:select name="cliente.id" from="${buscar.Cliente.list()}" optionKey="id" value="${veiculoInstance?.cliente?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="direcaoHidraulica"><g:message code="veiculo.direcaoHidraulica.label" default="Direcao Hidraulica" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'direcaoHidraulica', 'errors')}">
                                    <g:checkBox name="direcaoHidraulica" value="${veiculoInstance?.direcaoHidraulica}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="quatroPorQuatro"><g:message code="veiculo.quatroPorQuatro.label" default="Quatro Por Quatro" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'quatroPorQuatro', 'errors')}">
                                    <g:checkBox name="quatroPorQuatro" value="${veiculoInstance?.quatroPorQuatro}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="quatroPortas"><g:message code="veiculo.quatroPortas.label" default="Quatro Portas" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'quatroPortas', 'errors')}">
                                    <g:checkBox name="quatroPortas" value="${veiculoInstance?.quatroPortas}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="sensorDeEstacionamento"><g:message code="veiculo.sensorDeEstacionamento.label" default="Sensor De Estacionamento" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'sensorDeEstacionamento', 'errors')}">
                                    <g:checkBox name="sensorDeEstacionamento" value="${veiculoInstance?.sensorDeEstacionamento}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="som"><g:message code="veiculo.som.label" default="Som" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'som', 'errors')}">
                                    <g:checkBox name="som" value="${veiculoInstance?.som}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="travasEletricas"><g:message code="veiculo.travasEletricas.label" default="Travas Eletricas" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'travasEletricas', 'errors')}">
                                    <g:checkBox name="travasEletricas" value="${veiculoInstance?.travasEletricas}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="vidrosEletricos"><g:message code="veiculo.vidrosEletricos.label" default="Vidros Eletricos" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: veiculoInstance, field: 'vidrosEletricos', 'errors')}">
                                    <g:checkBox name="vidrosEletricos" value="${veiculoInstance?.vidrosEletricos}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
